import request from '@/utils/request'

// 查询树洞列表
export function listTreeHole(query) {
  return request({
    url: '/weblog/treeHole/list',
    method: 'get',
    params: query
  })
}

// 查询树洞详细
export function getTreeHole(id) {
  return request({
    url: '/weblog/treeHole/' + id,
    method: 'get'
  })
}

// 新增树洞
export function addTreeHole(data) {
  return request({
    url: '/weblog/treeHole',
    method: 'post',
    data: data
  })
}

// 修改树洞
export function updateTreeHole(data) {
  return request({
    url: '/weblog/treeHole',
    method: 'put',
    data: data
  })
}

// 删除树洞
export function delTreeHole(id) {
  return request({
    url: '/weblog/treeHole/' + id,
    method: 'delete'
  })
}
